import {
	request,
} from '@/api/request';
const apiList = [
	{
		name: 'school',
		url: '/api/index/school',
		method:'GET'
	},
	// bindSchool
	{
		name: 'bindSchool',
		url: '/api/index/bindSchool'
	},
	// /api/index/cate
	{
		name: 'cate',
		url: '/api/index/cate',
		method:'GET'
	},
	{
		// /api/index/infoList
		name: 'infoList',
		url: '/api/index/infoList',
		method:'GET'
	},
	{
		// /api/index/myNotice
		name: 'myNotice',
		url: '/api/index/myNotice',
		method:'GET'
	},
	// /api/index/comment
	{
		name: 'comment',
		url: '/api/index/comment',
		method:'GET'
	},
	// hot
	{
		name: 'hot',
		url: '/api/index/hot',
		method:'GET'
	},
	// good
	{
		name: 'good',
		url: '/api/index/good',
	},
	// comment
	{
		name: 'comment',
		url: '/api/index/comment',
	},
	// createInfo
	{
		name: 'createInfo',
		url: '/api/index/createInfo',
	},
]


module.exports = apiList.reduce((mode, params) => {
	mode[params.name] = (data, token) => request({
		url: params.url,
		method: params.method || 'POST',
		data,
		token,
		showlod:params.showlod
	})
	return mode
}, {})